package com.etone.smartAudit.mapstruct;

import com.etone.smartAudit.domain.Task;
import com.etone.smartAudit.domain.TaskHistory;
import com.etone.smartAudit.dto.task.BaseTaskDTO;
import com.etone.smartAudit.vo.task.*;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.NullValueCheckStrategy;

/**
 * @author: 蒋学伟
 * @create: 2020-07-03 17:07:07
 * @Description TaskMapper
 */
@Mapper(componentModel = "spring", nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface TaskMapstruct {

    void copyToModuleTaskDetailVO(Task task, @MappingTarget ModuleTaskDetailVO moduleTaskDetailVO);

    void copyToWorkTaskDetailVO(Task task, @MappingTarget WorkTaskDetailVO workTaskDetailVO);

    void copyToTemporaryTaskDetailVO(Task task, @MappingTarget TemporaryTaskDetailVO temporaryTaskDetailVO);

    void copyToToolWorkTaskVO(Task task, @MappingTarget ToolWorkTaskVO toolWorkTaskVO);

    void copyToServiceExpertWorkTaskVO(Task task, @MappingTarget ServiceExpertWorkTaskVO toolWorkTaskVO);

    void copyToItemSourceWorkTaskVO(Task task, @MappingTarget ItemSourceWorkTaskVO toolWorkTaskVO);

    void copyToDataWorkTaskVO(Task task, @MappingTarget DataWorkTaskVO toolWorkTaskVO);

    void baseTaskDTOCopyTo(@MappingTarget Task task, BaseTaskDTO baseTaskDTO);

    TaskHistory getTaskHistory(Task task);

    TaskDetailVO getTaskDetailVO(Task task);
}
